BSTR bstrMsg;
bstrMsg = ::SysAllocString(OLESTR("Hello"));

//Create a VARIANT of type VT_BSTR for the new string
VARIANT v;
v.vt = VT_BSTR;
v.bstrVal = bstrMsg;

// . . . Do something with the string data . . .

// Deallocate the BSTR
::SysFreeString(bstrMsg);

